]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensions-app: Support building a separate Devel app
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 22 Jan 2021 18:29:07 +0000 (19:29 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 11 Feb 2021 16:45:00 +0000 (17:45 +0100)
Follow the pattern used by most GNOME applications and add a profile
build option that allows building a Devel app instead of the regular
release.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3612

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1661>

subprojects/extensions-app/data/meson.build
subprojects/extensions-app/data/metainfo/meson.build
subprojects/extensions-app/js/meson.build
subprojects/extensions-app/js/org.gnome.Extensions.src.gresource.xml [deleted file]
subprojects/extensions-app/js/org.gnome.Extensions.src.gresource.xml.in [new file with mode: 0644]
subprojects/extensions-app/meson.build
subprojects/extensions-app/meson_options.txt

index e7bfa9965afd8e3115fd3c5ac7709e07f0b614cb..d7e7d4001c1853d4655a44ddaea676df297f038c 100644 (file)
@@ -1,6 +1,6 @@
 gnome.compile_resources(
   app_id + '.data',
-  app_id + '.data.gresource.xml',
+  base_id + '.data.gresource.xml',
   gresource_bundle: true,
   install: true,
   install_dir: pkgdatadir
@@ -16,7 +16,7 @@ desktopconf.set('prgname', prgname)
 
 i18n.merge_file('desktop',
   input: configure_file(
-    input: desktop_file + '.in.in',
+    input: base_id + '.desktop.in.in',
     output: desktop_file + '.in',
     configuration: desktopconf
   ),
@@ -36,7 +36,7 @@ if (desktop_file_validate.found())
 endif
 
 configure_file(
-  input: app_id + '.service.in',
+  input: base_id + '.service.in',
   output: app_id + '.service',
   configuration: desktopconf,
   install_dir: servicedir,
index dcdb03bd6a58ddd813f86cd0758760a7f78e14f7..4406a3e5bde4a80a5c4340177ab6ced1dd95734d 100644 (file)
@@ -1,6 +1,6 @@
 metainfo = app_id + '.metainfo.xml'
 i18n.merge_file(metainfo,
-  input: metainfo + '.in',
+  input: base_id + '.metainfo.xml.in',
   output: metainfo,
   po_dir: po_dir,
   install: true,
index a378a7e3472f8e3df24cb03db2142556664fd267..3b541592126a1ef4a042865f2e5c86531294d1b0 100644 (file)
@@ -16,7 +16,7 @@ configure_file(
 )
 
 configure_file(
-  input: app_id + '.in',
+  input: base_id + '.in',
   output: app_id,
   configuration: launcherconf,
   install_dir: pkgdatadir,
@@ -24,7 +24,11 @@ configure_file(
 
 gnome.compile_resources(
   app_id + '.src',
-  app_id + '.src.gresource.xml',
+  configure_file(
+    input: base_id + '.src.gresource.xml.in',
+    output: app_id + '.src.gresource.xml',
+    configuration: {'profile': '/'.join(profile.split('.')) },
+  ),
   source_dir: ['.', '../../../js'],
   gresource_bundle: true,
   install: true,
diff --git a/subprojects/extensions-app/js/org.gnome.Extensions.src.gresource.xml b/subprojects/extensions-app/js/org.gnome.Extensions.src.gresource.xml
deleted file mode 100644 (file)
index 8cda0f9..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<gresources>
-  <gresource prefix="/org/gnome/Extensions/js">
-    <file>main.js</file>
-
-    <file>misc/config.js</file>
-    <file>misc/extensionUtils.js</file>
-  </gresource>
-</gresources>
diff --git a/subprojects/extensions-app/js/org.gnome.Extensions.src.gresource.xml.in b/subprojects/extensions-app/js/org.gnome.Extensions.src.gresource.xml.in
new file mode 100644 (file)
index 0000000..330ede1
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/Extensions@profile@/js">
+    <file>main.js</file>
+
+    <file>misc/config.js</file>
+    <file>misc/extensionUtils.js</file>
+  </gresource>
+</gresources>
index 7a21acc7d2e692c50f1d7a9b79ebc8001fe4c73e..c68dfb1b1fdd32924f2b1437b068d29dbac445c1 100644 (file)
@@ -4,7 +4,14 @@ project('gnome-extensions-app',
   license: 'GPLv2+'
 )
 
-app_id = 'org.gnome.Extensions'
+if get_option('profile') == 'development'
+  profile = '.Devel'
+else
+  profile = ''
+endif
+
+base_id = 'org.gnome.Extensions'
+app_id = base_id + profile
 prgname = 'gnome-extensions-app'
 
 gnome = import('gnome')
index 435f237e6a3d6bbb5edc626fb304c37df18ac0b3..ca2eb411581f81d37586d9d6cc1960f87058ceb2 100644 (file)
@@ -2,3 +2,11 @@ option('package_name',
   type: 'string',
   description: 'The gettext domain name',
 )
+option('profile',
+  type: 'combo',
+  choices: [
+    'default',
+    'development'
+  ],
+  value: 'default'
+)